//
//  DFSinglePageController.m
//  DFKit
//
//  Created by rujia chen on 17/4/17.
//  Copyright © 2017年 chenrj90. All rights reserved.
//

#import "DFSinglePageController.h"

@interface DFSinglePageController ()

@end

@implementation DFSinglePageController

- (NSString *)title {
    return [super title]?:@"title";
}

- (void)viewDidLoad {
    [super viewDidLoad];
    UIView *v = DFMakeViewWithBackgroundColor([UIColor df_randomColor]);
    [v df_setIntrinsicContentSizeBlock:^CGSize(UIView *view) {
        return CGSizeMake(200, 200);
    }];
    [self.view addSubview:v];
    self.view.backgroundColor = [UIColor whiteColor];
    [v mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.equalTo(self.view);
        make.top.equalTo(self.mas_topLayoutGuideBottom);
    }];
    [v addTapGestureRecognizer:^(UITapGestureRecognizer *recognizer, NSString *gestureId) {
        DFSinglePageController *v = [[DFSinglePageController alloc] init];
        [self.navigationController pushViewController:v animated:YES];
    }];
    [self.navigationItem setRightBarButtonItem:[[UIBarButtonItem alloc] initWithTitle:@"abc" style:UIBarButtonItemStylePlain target:nil action:nil]];
}

- (UIStatusBarStyle)preferredStatusBarStyle {
    return UIStatusBarStyleLightContent;
}

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
}

- (void)viewDidAppear:(BOOL)animated {
    [super viewDidAppear:animated];
}

@end
